import com.itwang.common.CmpLinkedHashSetIps;
import com.itwang.common.IpGeter;
import com.itwang.common.SendEmail;
import org.junit.Test;

import java.util.LinkedHashSet;

public class test {
	
	@Test
	public void testIp() {
		LinkedHashSet<String> ipvs = IpGeter.ipvs();
		
		System.out.println(CmpLinkedHashSetIps.cmp(ipvs, ipvs));
		for (String ipv : ipvs) {
			System.out.println(ipv);
		}
		
		System.out.println("======================");
		
		LinkedHashSet<String> strings = IpGeter.screenValidIp(ipvs);
		for (String string : strings) {
			
			System.out.println(string);
		}
		System.out.println("+++++++++++++++++++++++++++++++");
		System.out.println(IpGeter.getIpString(strings));
		
	}
	
	@Test
	public void testIp1() {
		
		try {
			SendEmail.sendMessage(IpGeter.getLocalIpAString());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}
